import React, { Component } from 'react';
// 导入contextObj 对象
import contextObj from '../../utils/context';
const { Consumer } = contextObj;
class Grandson extends Component {
    render() {
        return (
            <div>
                我是孙子组件-乾隆
                {/* 形参就是接收的数据 */}
                <Consumer>
                    {
                        (value) => {
                            return <p>{value}</p>
                        }
                    }
                </Consumer>
            </div>
        );
    }
}

export default Grandson;
